package cn.myzqu.start.rabbitmq;


import cn.myzqu.start.rabbitmq.config.RabbitConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MsgReceiver {


    @RabbitListener(queues = RabbitConfig.QUEUE_A)
    @RabbitHandler
    public void processA(String content) {
        log.info("接收处理队列A当中的消息： " + content);
    }

    @RabbitListener(queues = RabbitConfig.QUEUE_B)
    @RabbitHandler
    public void processB(String content) {
        log.info("接收处理队列B当中的消息： " + content);
    }

    @RabbitListener(queues = RabbitConfig.QUEUE_C)
    @RabbitHandler
    public void processC(String content) {
        log.info("接收处理队列C当中的消息： " + content);
    }


}
